<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
	version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:xpath="http://www.w3.org/2005/xpath-functions"
	xmlns="http://www.w3.org/1999/xhtml">

	<xsl:output method="xml" indent="yes" />

	<xsl:variable name="litros-m2" select="'25'" />
	
	<xsl:template match="/precipitaciones">
		<precipitaciones>
			<xsl:for-each select="registro[litros-m2 &gt;= $litros-m2]">
				<xsl:sort order="descending" select="litros-m2" />
				<lugar>
					<xsl:value-of select="lugar" />
				</lugar>
				<fecha>
					<xsl:value-of select="fecha" />
				</fecha>
				<litros-m2>
					<xsl:value-of select="litros-m2" />
				</litros-m2>
			</xsl:for-each>
		</precipitaciones>
	</xsl:template>

</xsl:stylesheet>
